package com.jswlw.controller.api.helper;

import com.jswlw.entity.biz.DevFilter;
import com.jswlw.entity.biz.DevInfo;
import com.jswlw.service.biz.DevFilterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 吴维斌 E-mail:wuweibin0817@163.com
 * @version 创建时间：${date} ${time}
 */
@Component
public class DevInfoHelper {

    @Autowired
    DevFilterService devFilterService;

    public DevInfo createDevInfo(String devSn) {
        //构建devSn
        DevFilter devFilter = devFilterService.find4Id(1);
        return DevInfo.builder()
                .devStatus(1)
                .remainFlow(0)
                .remainTime(0)
                .usedFlow(0)
                .usedTime(0)
                .purityTds(0)
                .rawTds(0)
                .onlineStatus(1)
                .repairNum(0)
                .asignal(1)
                .onlineTime(new Date())
                .createTime(new Date())
                .build();
    }
}
